package com.loie.xcx.model.bankdto;


import com.alibaba.fastjson2.JSONObject;
import lombok.Data;

import java.io.Serializable;

@Data
public class ResultDTO implements Serializable {

    private static final long serialVersionUID = 1L;

    private String requestId;
    private Boolean success;
    private JSONObject data = new JSONObject();
    private String statusMsg = "";
    private String statusCode;
    private Integer code;


    public
    ResultDTO(String requestId) {
        this.requestId = requestId;
        success = true;
        statusCode = "OK";
        code=0;
    }

    public
    ResultDTO(String requestId, String errorMsg, String errorCode) {
        success = false;
        this.requestId = requestId;
        this.statusMsg = errorMsg;
        this.statusCode = errorCode;
        this.code=1001;
    }

    public boolean checkSuc() {
        return success;
    }


}
